
    <table align="center" width="100%" cellpadding="1" cellspacing="1">
        {{if isset($_SESSION["CART"])}}
            {{$cash=0}}
            {{if isset($_SESSION["CART"]["PR"])}}
                {{foreach $_SESSION["CART"]["PR"] as $pr}}
                    <tr class="{{$pr->Alias}} product">
                        <td>{{$pr->ProductName|truncate:24:"..."}}</td>
                        <td align="center" width="10%">{{$pr->NUM}}</td>
                        <td align="right">
                            {{if isset($_SESSION["Discounts"]) and ","|cat:$_SESSION["Discounts"]|cat:","|strpos:$pr->ProductID and isset($_SESSION["push"]["user"])}}
                                ${{$pr->NUM*$pr->UnitPrice*90/100}}
                                {{$cash=$cash+$pr->NUM*$pr->UnitPrice*90/100}}
                            {{else}}
                                ${{$pr->NUM*$pr->UnitPrice}}
                                {{$cash=$cash+$pr->NUM*$pr->UnitPrice}}
                            {{/if}}
                        </td>
                        <td width="7%" align="right">
                            <a href="JavaScript:removeToCart('{{$pr->Alias}}')">X</a>
                        </td>
                    </tr>
                {{/foreach}}
            {{/if}}
            {{if isset($_SESSION["CART"]["PK"])}}
                {{foreach $_SESSION["CART"]["PK"] as $pk}}
                    {{$cash=$cash+$pk->NUM*$pk->UnitPrice}}
                    <tr class="{{$pk->Alias}} package">
                        <td>{{$pk->PackageName|truncate:24:"..."}}</td>
                        <td align="center" width="10%">{{$pk->NUM}}</td>
                        <td align="right">${{$pk->NUM*$pk->UnitPrice}}</td>
                        <td width="7%" align="right">
                            <a href="JavaScript:removepkToCart('{{$pk->Alias}}')">X</a>
                        </td>
                    </tr>
                {{/foreach}}
            {{/if}}
            <tr>
                <th>TOTAL:</th>
                <th align="right" colspan="2">${{$cash}}</th>
                <th>&nbsp;</th>
            </tr>
            <tr>
                <th><a href="{{base_url("cart")}}"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_SM.gif"/></a></th>
                <th colspan="3">
                    <a href="{{base_url("checkout")}}">
                        <img src="{{base_url()}}PushClimb/images/checkout_butt.png">
                    </a>
                </th>
                
            </tr>
        {{else}}
            <tr>
                <td colspan="4">Your cart is empty.</td>
            </tr>
            <tr>
                <th>TOTAL:</th>
                <th align="right" colspan="2">0 VND</th>
                <th>&nbsp;</th>
            </tr>
        {{/if}}

    </table>
